package cn.zh.stan.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import cn.zh.stan.R;
import cn.zh.stan.activity.BusyMsg;
import cn.zh.stan.activity.SysMsg;

/**
 * Created by WYN on 2018/1/15 0015.
 */

public class NotifyFragment extends Fragment implements View.OnClickListener {

     LinearLayout busymsg,sysmsg;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
         View view=inflater.inflate(R.layout.fragment_noty,container,false);
          initnf(view);
         return view;
      }


     public void initnf(View view){
         busymsg=view.findViewById(R.id.busymsg);
         sysmsg=view.findViewById(R.id.sysmsg);
         busymsg.setOnClickListener(this);
         sysmsg.setOnClickListener(this);

       }


    @Override
    public void onClick(View view) {
        int id=view.getId();
        Intent intent=null;
        switch (id){
            case R.id.busymsg:
                intent=new Intent(getActivity(), BusyMsg.class);
                break;
            case R.id.sysmsg:
                intent=new Intent(getActivity(), SysMsg.class);
                break;
             }
           getActivity().startActivity(intent);
       }


}
